package xyz.icxl.android.architecture.ui.mvvm

import android.os.Bundle
import androidx.databinding.ViewDataBinding
import xyz.icxl.android.architecture.ui.BaseActivity

abstract class BaseVMActivity<VM : BaseViewModel, DB : ViewDataBinding> : BaseActivity<DB>() {

    abstract val mViewModel: VM

    override fun onCreate(savedInstanceState: Bundle?) {
        registerObserver()
        super.onCreate(savedInstanceState)
        mViewModel.loadingStatus.observe(this,pageLoadingDialogStatus)
        mViewModel.snackbarStatus.observe(this,pageSnackbarStatusObserver)
    }

    abstract fun registerObserver()

}